Optimal. Leaf size=75 \[ \frac{i \tan ^2(c+d x)}{2 a^3 d}-\frac{3 \tan (c+d x)}{a^3 d}+\frac{4 i \log (\sin (c+d x))}{a^3 d}-\frac{4 i \log (\tan (c+d x))}{a^3 d}+\frac{4 x}{a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0805796, antiderivative size = 75, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3088, 848, 88} \[ \frac{i \tan ^2(c+d x)}{2 a^3 d}-\frac{3 \tan (c+d x)}{a^3 d}+\frac{4 i \log (\sin (c+d x))}{a^3 d}-\frac{4 i \log (\tan (c+d x))}{a^3 d}+\frac{4 x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3088
Rule 848
Rule 88
Rubi steps
\begin{align*} \int \frac{\sec ^3(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{x^3 (i a+a x)^3} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{\left (-\frac{i}{a}+\frac{x}{a}\right )^2}{x^3 (i a+a x)} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{i}{a^3 x^3}-\frac{3}{a^3 x^2}-\frac{4 i}{a^3 x}+\frac{4 i}{a^3 (i+x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac{4 x}{a^3}+\frac{4 i \log (\sin (c+d x))}{a^3 d}-\frac{4 i \log (\tan (c+d x))}{a^3 d}-\frac{3 \tan (c+d x)}{a^3 d}+\frac{i \tan ^2(c+d x)}{2 a^3 d}\\ \end{align*}
Mathematica [A] time = 0.599273, size = 110, normalized size = 1.47 \[ \frac{i \sec (c) \sec ^2(c+d x) (\cos (c) (4 \log (\cos (c+d x))-4 i d x+1)-i (2 \cos (c+2 d x) (d x+i \log (\cos (c+d x)))+2 \cos (3 c+2 d x) (d x+i \log (\cos (c+d x)))-6 \sin (d x) \cos (c+d x)))}{2 a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.196, size = 52, normalized size = 0.7 \begin{align*} -3\,{\frac{\tan \left ( dx+c \right ) }{d{a}^{3}}}+{\frac{{\frac{i}{2}} \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{d{a}^{3}}}-{\frac{4\,i\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{d{a}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.64775, size = 404, normalized size = 5.39 \begin{align*} \frac{-8 i \, d x +{\left (4 i \, \cos \left (4 \, d x + 4 \, c\right ) + 8 i \, \cos \left (2 \, d x + 2 \, c\right ) - 4 \, \sin \left (4 \, d x + 4 \, c\right ) - 8 \, \sin \left (2 \, d x + 2 \, c\right ) + 4 i\right )} \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right ) +{\left (-8 i \, d x - 8 i \, c\right )} \cos \left (4 \, d x + 4 \, c\right ) +{\left (-16 i \, d x - 16 i \, c - 4\right )} \cos \left (2 \, d x + 2 \, c\right ) +{\left (2 \, \cos \left (4 \, d x + 4 \, c\right ) + 4 \, \cos \left (2 \, d x + 2 \, c\right ) + 2 i \, \sin \left (4 \, d x + 4 \, c\right ) + 4 i \, \sin \left (2 \, d x + 2 \, c\right ) + 2\right )} \log \left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right ) + 8 \,{\left (d x + c\right )} \sin \left (4 \, d x + 4 \, c\right ) +{\left (16 \, d x + 16 \, c - 4 i\right )} \sin \left (2 \, d x + 2 \, c\right ) - 8 i \, c - 6}{{\left (-i \, a^{3} \cos \left (4 \, d x + 4 \, c\right ) - 2 i \, a^{3} \cos \left (2 \, d x + 2 \, c\right ) + a^{3} \sin \left (4 \, d x + 4 \, c\right ) + 2 \, a^{3} \sin \left (2 \, d x + 2 \, c\right ) - i \, a^{3}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.484404, size = 317, normalized size = 4.23 \begin{align*} \frac{8 \, d x e^{\left (4 i \, d x + 4 i \, c\right )} + 8 \, d x +{\left (16 \, d x - 4 i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} +{\left (4 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 8 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 4 i\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 6 i}{a^{3} d e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18891, size = 176, normalized size = 2.35 \begin{align*} \frac{2 \,{\left (-\frac{4 i \, \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}{a^{3}} + \frac{2 i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} + \frac{2 i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} + \frac{-3 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 7 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 i}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{2} a^{3}}\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]